package com.ymttest.database.mapping.orderrisk;

import com.ymttest.database.model.orderrisk.HighRiskProduct;
import com.ymttest.database.model.orderrisk.HighRiskProductExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface HighRiskProductMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table high_risk_product
     *
     * @mbggenerated Mon Nov 23 18:32:54 CST 2020
     */
    @SelectProvider(type=HighRiskProductSqlProvider.class, method="countByExample")
    int countByExample(HighRiskProductExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table high_risk_product
     *
     * @mbggenerated Mon Nov 23 18:32:54 CST 2020
     */
    @DeleteProvider(type=HighRiskProductSqlProvider.class, method="deleteByExample")
    int deleteByExample(HighRiskProductExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table high_risk_product
     *
     * @mbggenerated Mon Nov 23 18:32:54 CST 2020
     */
    @Delete({
        "delete from high_risk_product",
        "where id = #{id,jdbcType=BIGINT}"
    })
    int deleteByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table high_risk_product
     *
     * @mbggenerated Mon Nov 23 18:32:54 CST 2020
     */
    @Insert({
        "insert into high_risk_product (id, product_id, ",
        "bad_comment_rate, refund_rate, ",
        "data_effective_date, add_time)",
        "values (#{id,jdbcType=BIGINT}, #{product_id,jdbcType=VARCHAR}, ",
        "#{bad_comment_rate,jdbcType=DECIMAL}, #{refund_rate,jdbcType=DECIMAL}, ",
        "#{data_effective_date,jdbcType=VARCHAR}, #{add_time,jdbcType=TIMESTAMP})"
    })
    int insert(HighRiskProduct record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table high_risk_product
     *
     * @mbggenerated Mon Nov 23 18:32:54 CST 2020
     */
    @InsertProvider(type=HighRiskProductSqlProvider.class, method="insertSelective")
    int insertSelective(HighRiskProduct record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table high_risk_product
     *
     * @mbggenerated Mon Nov 23 18:32:54 CST 2020
     */
    @SelectProvider(type=HighRiskProductSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="product_id", property="product_id", jdbcType=JdbcType.VARCHAR),
        @Result(column="bad_comment_rate", property="bad_comment_rate", jdbcType=JdbcType.DECIMAL),
        @Result(column="refund_rate", property="refund_rate", jdbcType=JdbcType.DECIMAL),
        @Result(column="data_effective_date", property="data_effective_date", jdbcType=JdbcType.VARCHAR),
        @Result(column="add_time", property="add_time", jdbcType=JdbcType.TIMESTAMP)
    })
    List<HighRiskProduct> selectByExample(HighRiskProductExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table high_risk_product
     *
     * @mbggenerated Mon Nov 23 18:32:54 CST 2020
     */
    @Select({
        "select",
        "id, product_id, bad_comment_rate, refund_rate, data_effective_date, add_time",
        "from high_risk_product",
        "where id = #{id,jdbcType=BIGINT}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
        @Result(column="product_id", property="product_id", jdbcType=JdbcType.VARCHAR),
        @Result(column="bad_comment_rate", property="bad_comment_rate", jdbcType=JdbcType.DECIMAL),
        @Result(column="refund_rate", property="refund_rate", jdbcType=JdbcType.DECIMAL),
        @Result(column="data_effective_date", property="data_effective_date", jdbcType=JdbcType.VARCHAR),
        @Result(column="add_time", property="add_time", jdbcType=JdbcType.TIMESTAMP)
    })
    HighRiskProduct selectByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table high_risk_product
     *
     * @mbggenerated Mon Nov 23 18:32:54 CST 2020
     */
    @UpdateProvider(type=HighRiskProductSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") HighRiskProduct record, @Param("example") HighRiskProductExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table high_risk_product
     *
     * @mbggenerated Mon Nov 23 18:32:54 CST 2020
     */
    @UpdateProvider(type=HighRiskProductSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") HighRiskProduct record, @Param("example") HighRiskProductExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table high_risk_product
     *
     * @mbggenerated Mon Nov 23 18:32:54 CST 2020
     */
    @UpdateProvider(type=HighRiskProductSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(HighRiskProduct record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table high_risk_product
     *
     * @mbggenerated Mon Nov 23 18:32:54 CST 2020
     */
    @Update({
        "update high_risk_product",
        "set product_id = #{product_id,jdbcType=VARCHAR},",
          "bad_comment_rate = #{bad_comment_rate,jdbcType=DECIMAL},",
          "refund_rate = #{refund_rate,jdbcType=DECIMAL},",
          "data_effective_date = #{data_effective_date,jdbcType=VARCHAR},",
          "add_time = #{add_time,jdbcType=TIMESTAMP}",
        "where id = #{id,jdbcType=BIGINT}"
    })
    int updateByPrimaryKey(HighRiskProduct record);
}